.class Lcom/bitauto/autoeasy/picture/PictureViewActivity$SwipeDetector;
.super Landroid/view/GestureDetector$SimpleOnGestureListener;
.source "PictureViewActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/bitauto/autoeasy/picture/PictureViewActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "SwipeDetector"
.end annotation


# instance fields
.field final synthetic this$0:Lcom/bitauto/autoeasy/picture/PictureViewActivity;


# direct methods
.method constructor <init>(Lcom/bitauto/autoeasy/picture/PictureViewActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 144
    iput-object p1, p0, Lcom/bitauto/autoeasy/picture/PictureViewActivity$SwipeDetector;->this$0:Lcom/bitauto/autoeasy/picture/PictureViewActivity;

    invoke-direct {p0}, Landroid/view/GestureDetector$SimpleOnGestureListener;-><init>()V

    return-void
.end method


# virtual methods
.method public onFling(Landroid/view/MotionEvent;Landroid/view/MotionEvent;FF)Z
    .locals 9
    .parameter "e1"
    .parameter "e2"
    .parameter "velocityX"
    .parameter "velocityY"

    .prologue
    const/4 v8, 0x0

    .line 150
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v5

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getY()F

    move-result v6

    sub-float/2addr v5, v6

    invoke-static {v5}, Ljava/lang/Math;->abs(F)F

    move-result v5

    float-to-double v3, v5

    .line 151
    .local v3, vertical:D
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v5

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F

    move-result v6

    sub-float/2addr v5, v6

    invoke-static {v5}, Ljava/lang/Math;->abs(F)F

    move-result v5

    float-to-double v0, v5

    .line 154
    .local v0, horizontal:D
    iget-object v5, p0, Lcom/bitauto/autoeasy/picture/PictureViewActivity$SwipeDetector;->this$0:Lcom/bitauto/autoeasy/picture/PictureViewActivity;

    invoke-virtual {v5}, Lcom/bitauto/autoeasy/picture/PictureViewActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v5

    iget v2, v5, Landroid/util/DisplayMetrics;->density:F

    .line 155
    .local v2, scale:F
    const-string v5, "PhotoFullScreenViewerActivity"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "Screen Density = "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 158
    const-wide/high16 v5, 0x4044

    cmpl-double v5, v3, v5

    if-lez v5, :cond_0

    move v5, v8

    .line 174
    :goto_0
    return v5

    .line 162
    :cond_0
    const-wide/high16 v5, 0x4030

    cmpl-double v5, v0, v5

    if-lez v5, :cond_2

    .line 163
    invoke-static {p3}, Ljava/lang/Math;->abs(F)F

    move-result v5

    iget-object v6, p0, Lcom/bitauto/autoeasy/picture/PictureViewActivity$SwipeDetector;->this$0:Lcom/bitauto/autoeasy/picture/PictureViewActivity;

    invoke-static {v6}, Lcom/bitauto/autoeasy/picture/PictureViewActivity;->access$0(Lcom/bitauto/autoeasy/picture/PictureViewActivity;)I

    move-result v6

    int-to-float v6, v6

    cmpl-float v5, v5, v6

    if-lez v5, :cond_2

    .line 165
    const/4 v5, 0x0

    cmpg-float v5, p3, v5

    if-gez v5, :cond_1

    .line 166
    iget-object v5, p0, Lcom/bitauto/autoeasy/picture/PictureViewActivity$SwipeDetector;->this$0:Lcom/bitauto/autoeasy/picture/PictureViewActivity;

    invoke-virtual {v5}, Lcom/bitauto/autoeasy/picture/PictureViewActivity;->moveScreenLeft()V

    .line 172
    :goto_1
    const/4 v5, 0x1

    goto :goto_0

    .line 170
    :cond_1
    iget-object v5, p0, Lcom/bitauto/autoeasy/picture/PictureViewActivity$SwipeDetector;->this$0:Lcom/bitauto/autoeasy/picture/PictureViewActivity;

    invoke-virtual {v5}, Lcom/bitauto/autoeasy/picture/PictureViewActivity;->moveScreenRight()V

    goto :goto_1

    :cond_2
    move v5, v8

    .line 174
    goto :goto_0
.end method
